var mongoose = require('mongoose');




var saleItemSchema = mongoose.Schema({
	name:String,
	sl:Number,
	dj:Number,
	zj:Number
});

var schema = mongoose.Schema({
	user:String,//操作人
	type:{type: Number, default: 0},//0-销售相关 1-进货相关 2-其他
	price:{ type: Number, default: 0 },
	time:Date,
	items:[saleItemSchema],
});
var Sale=mongoose.model('sales', schema)

module.exports = Sale;